//引入vue路由
import VueRouter from 'vue-router'
//引入vue
import Vue from  'vue'

//安装VueRouter
Vue.use(VueRouter)

//解决路由报错配置
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}

export const router = new VueRouter({
    routes:[
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            name:'login',
            path:'/login',
            component:() => import('../components/common/login/Login.vue')
        },
        {
            path:'/',
            component:() => import('../components/common/main/Home.vue'),
            children:[
                {
                    name:'dashboard',
                    path:'/dashboard',
                    meta:{title:'首页'},
                    component:() => import('../components/common/main/Dashboard.vue')
                },
                {
                    name:'CaseExam',
                    path:'/CaseExam',
                    meta:{title:'利益冲突检查'},
                    component:() => import('../components/gs/CaseExam/CaseExam.vue')
                },
                {
                    name:'Choice',
                    path:'/Choice',
                    meta:{title:'新增案件'},
                    component:() => import('../components/gs/Choice/Choice.vue')
                },{
                    //用户管理路由
                    name:'CaseList',
                    path:'/CaseList',
                    meta:{title:'我的案件'},
                    component:() => import('../components/gs/CaseList/CaseList.vue')
                },{
                    name:'Zxdl',
                    path:'/Zxdl',
                    meta:{title:'咨询与代理'},
                    component:() => import('../components/gs/ZXDL/ZxdlList.vue')
                },{
                    name:'Feiyong',
                    path:'/Feiyong',
                    meta:{title:'费用减免申请'},
                    component:() => import('../components/gs/Feiyong/FeiyongList.vue')
                },{
                    name:'Yongyin',
                    path:'/Yongyin',
                    meta:{title:'用印申请'},
                    component:() => import('../components/gs/Yongyin/Yongyin.vue')
                },{
                    name:'AllCaseLaw',
                    path:'/AllCaseLaw',
                    meta:{title:'所有案件'},
                    component:() => import('../components/gs/AllCaseLaw/CaseList.vue')
                },{
                    name:'ManagerCaseLaw',
                    path:'/ManagerCaseLaw',
                    meta:{title:'管理案件'},
                    component:() => import('../components/gs/ManagerCaseLaw/ManagerCaseLaw.vue')
                },{
                    name:'ManagerCaseBnjg',
                    path:'/ManagerCaseBnjg',
                    meta:{title:'开庭/侦察/检查'},
                    component:() => import('../components/gs/ManagerCaseBnjg/ManagerCaseBnjg.vue')
                },{
                    name:'MyClient',
                    path:'/MyClient',
                    meta:{title:'我的客户'},
                    component:() => import('../components/gs/Client/ClientList.vue')
                },{
                    name:'AllClient',
                    path:'/AllClient',
                    meta:{title:'所有客户'},
                    component:() => import('../components/gs/Client/ClientList.vue')
                },{
                    name:'EditLog',
                    path:'/EditLog',
                    meta:{title:'添加工作日志'},
                    component:() => import('../components/gs/Log/EditLog.vue')
                },{
                    name:'MyJoblog',
                    path:'/MyJoblog',
                    meta:{title:'我的工作日志'},
                    component:() => import('../components/gs/Log/LogList.vue')
                },{
                    name:'AllJoblog',
                    path:'/AllJoblog',
                    meta:{title:'全部工作日志'},
                    component:() => import('../components/gs/Log/LogList.vue')
                },{
                    name:'UsersManage',
                    path:'/UsersManage',
                    meta:{title:'用户管理'},
                    component:() => import('../components/mfy/system_user/System_userOrSystem_Role.vue')
                },{
                    //行政公告路由
                    name:'AdmNoticetable',
                    path:'/AdmNoticetable',
                    meta:{title:'公告通知'},
                    component:() => import('../components/gsl/AdmNotice/AdmNoticetable.vue')
                },{
                    //行政通讯路由
                    name:'AdmAddresslist',
                    path:'/AdmAddresslist',
                    meta:{title:'通讯录'},
                    component:() => import('../components/gsl/utli/AdmAddresslisttabs.vue')
                },{
                    //行政管理公告路由
                    name:'AdmNoticeAll',
                    path:'/AdmNoticeAll',
                    meta:{title:'管理公告'},
                    component:() => import('../components/gsl/AdmNotice/AdmNoticeAll.vue')
                },
                {
                    //跳转到行政管理公告路由
                    name:'gg',
                    path:'/gg',
                    meta:{title:'公告'},
                    component:() => import('../components/gsl/AdmNotice/AdmNoticetable.vue')
                },

                {
                    //我的收支
                    name:'MyFinance',
                    path:'/MyFinance',
                    meta:{title:'我的收支'},
                    component:() => import('../components/ww/finance/myfinance.vue')
                },{
                    //行政签到管理路由
                    name:'AdmSigninreco',
                    path:'/AdmSigninreco',
                    meta:{title:'签到管理'},
                    component:() => import('../components/gsl/utli/AdmSigninrecor.vue')
                },{
                    //行政建议投诉路由
                    name:'AdmComplain',
                    path:'/AdmComplain',
                    meta:{title:'建议投诉'},
                    component:() => import('../components/gsl/AdmComplain/AdmComplain.vue')
                },{
                    //行政快速登记路由
                    name:'AdmExpressage',
                    path:'/AdmExpressage',
                    meta:{title:'快速登记'},
                    component:() => import('../components/gsl/utli/AdmExpressage.vue')
                }, {
                    //审批流设置
                    name:'ActionManage',
                    path:'/ActionManage',
                    meta:{title:'审批流设置 '},
                    component:() => import('../components/mfy/flow/Flow.vue')
                },
                {
                    //我的申请
                    name:'MyList',
                    path:'/MyList',
                    meta:{title:'我的申请 '},
                    component:() => import('../components/mfy/myList/MyList.vue')
                },
                {
                    //跳转到我的申请
                    name:'sq',
                    path:'/sq',
                    meta:{title:'我的申请 '},
                    component:() => import('../components/mfy/myList/MyList.vue')
                },
                {
                    //档案
                    name:'OnFile',
                    path:'/OnFile',
                    meta:{title:'电子归档 '},
                    component:() => import('../components/mfy/onFile/OnFile_or_MyOnFile.vue')
                },
                {
                    //档案
                    name:'dananjieyue',
                    path:'/dananjieyue',
                    meta:{title:'档案借阅 '},
                    component:() => import('../components/mfy/onFile/NonoAndNo.vue')
                },
                {
                    //我的待办事项
                    name:'Mybacklog',
                    path:'/Mybacklog',
                    meta:{title:'我的待办事项 '},
                    component:() => import('../components/mfy/mybacklog/Mybacklog.vue')

                },
                {
                    //我的待办事项
                    name:'List2',
                    path:'/List2',
                    meta:{title:'审批中心 '},
                    component:() => import('../components/mfy/myList/MyList.vue')
                },
                {
                    //跳转到我的待办事项
                    name:'dbsx',
                    path:'/dbsx',
                    meta:{title:'我的待办事项 '},
                    component:() => import('../components/mfy/mybacklog/Mybacklog.vue')
                },
                {
                    //我的待办事项
                    name:'List',
                    path:'/List',
                    meta:{title:'全所电子归档'},
                    component:() => import('../components/mfy/onFile/Alldocument.vue')
                },

                {
                    //我的收入
                    name:'MyInCome',
                    path:'/MyInCome',
                    meta:{title:'我的收入'},
                    component:() => import('../components/ww/finance/myIncome.vue')
                },
                {
                     //我的发票
                    name:'MyBill',
                    path:'/MyBill',
                    meta:{title:'我的发票'},
                    component:() => import('../components/ww/bill/MyBill.vue')
                },
                {
                    //案件收支录入
                    name:'CaseFinanace',
                    path:'/CaseFinanace',
                    meta:{title:'案件收支录入'},
                    component:() => import('../components/ww/caseFinanace/CaseFinanace.vue')
                },
                {// 律所收支录入
                    name:'LsFinanace',
                    path:'/LsFinanace',
                    meta:{title:'律所收支录入'},
                    component:() => import('../components/ww/lsFinanace/LsFinanace.vue')
                },{
                    //人事团队路由
                    name:'Hrteam',
                    path:'/Hrteam',
                    meta:{title:'团队管理'},
                    component:() => import('../components/gsl/HrTeam/HrTeam.vue')
                },{
                    //人事团队路由
                    name:'Hremp',
                    path:'/Hremp',
                    meta:{title:'人事档案'},
                    component:() => import('../components/gsl/HrEmp/HrEmp.vue')
                },
                {
                   // 所有收支
                    name:'AllIncome',
                    path:'/AllIncome',
                    meta:{title:'全部收支明细'},
                    component:() => import('../components/ww/allIncome/AllIncome.vue')
                },
                {
                    //开具发票
                    name:'KpList',
                    path:'/KpList',
                    meta:{title:'开具发票'},
                    component:() => import('../components/ww/kpList/KpList.vue')
                },
                {
                    //代开发票
                    name:'ActApplyBill',
                    path:'/ActApplyBill',
                    meta:{title:'代开发票'},
                    component:() => import('../components/ww/actApplyBill/ActApplyBill.vue')
                },
                {
                    //财务统计
                    name:'FinanceCount',
                    path:'/FinanceCount',
                    meta:{title:'财务统计'},
                    component:() => import('../components/ww/financeCount/FinanceCount.vue')
                },
                {
                    //收结案统计
                    name:'SettleCase',
                    path:'/SettleCase',
                    meta:{title:'收结案统计'},
                    component:() => import('../components/ww/settleCase/SettleCase.vue')
                },
                {
                    //用印统计
                    name:'Official',
                    path:'/Official',
                    meta:{title:'用印统计'},
                    component:() => import('../components/ww/official/Official.vue')
                },
                {
                    //用印统计
                    name:'ActionMagess',
                    path:'/ActionMagess',
                    meta:{title:'综合统计中心'},
                    component:() => import('../components/ww/actionMagess/ActionMagess.vue')
                },
                {
                    //工资录入
                    name:'SalaryInsrt',
                    path:'/SalaryInsrt',
                    meta:{title:'工资录入'},
                    component:() => import('../components/ww/salaryInsrt/SalaryInsrt.vue')
                }
            ]
        },
        {
            //其他情况错误
            path: '*',
            component: Error
        }
    ]
})
